/*
 ------------------------------------------------------------------------------
 Copyright (C) 1996-2001 Id Software, Inc.

 This file is part of the Quake source code.

 The Quake source code is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or (at your
 option) any later version.

 The Quake source code is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 more details.

 You should have received a copy of the GNU General Public License along with
 the Quake source code; if not, write to the Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 ------------------------------------------------------------------------------
*/


//
// swap.h - byte swaping library
//


#ifndef __SWAP_H__
#define __SWAP_H__


#if LITTLE_ENDIAN

#define LittleShort
#define BigShort(s)					SwapShort(s)
#define LittleLong
#define BigLong(l)					SwapLong(l)
#define LittleFloat
#define BigFloat(f)					SwapFloat(f)

#endif

#if BIG_ENDIAN

#define LittleShort					SwapShort(s)
#define BigShort(s)
#define LittleLong					SwapLong(l)
#define BigLong(l)
#define LittleFloat					SwapFloat(f)
#define BigFloat(f)

#endif

short			SwapShort (short s);
int				SwapLong (int l);
float			SwapFloat (float f);


#endif	// __SWAP_H__